<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="warp"> 
        <button id="btn">确认</button>
    </div>
    <script>
        let warp = document.getElementById('warp')
        let btn = document.getElementById('btn')
        //给btn打上标签
        const disabledElements = new WeakSet()
        disabledElements.add(btn)

        btn.addEventListener('click',()=>{
            warp.removeChild(btn)
            console.log(disabledElements);
        })
    </script>
</body>
</html>